package com.ycp.erp.warehouse.ui.fragment;

import android.os.Bundle;

import com.one.common.view.base.IListView;
import com.one.common.view.pagestate.listpage.BaseListFragment;
import com.ycp.erp.warehouse.model.bean.Warehouse;
import com.ycp.erp.warehouse.presenter.WarehousePresenter;
import com.ycp.erp.warehouse.ui.binder.MoveWarehouseBinder;

/**
 * Class Des:
 * Created by bjh on 2021/8/30.
 */
public class MoveWareHouseFragment extends BaseListFragment<WarehousePresenter> implements IListView {
    @Override
    protected void initPresenter() {
        mPresenter=new WarehousePresenter(this,getActivity());
    }

    @Override
    public void registerDate() {
        MoveWarehouseBinder warehouseBinder =new MoveWarehouseBinder();
        register(Warehouse.class,warehouseBinder);
    }

    @Override
    public void loadData() {
        mPresenter.getOutWarehouses();

    }

    @Override
    public void initData() {
        super.initData();
        mPresenter.getOutWarehouses();
    }

    /**
     * 获取一个任务列表的实例
     */
    public static MoveWareHouseFragment getInstance(String taskState) {
        MoveWareHouseFragment fragment = new MoveWareHouseFragment();
        Bundle bundle = new Bundle();
        bundle.putString("taskState", taskState);
        fragment.setArguments(bundle);
        return fragment;
    }
}
